<?php

namespace App\Http\Controllers;

use App\Http\Controllers\BaseController;
use App\Services\OrderAuditLogService;
use Illuminate\Http\Request;

class OrderAuditLogController extends BaseController
{
    public function __construct(OrderAuditLogService $orderAuditLogService)
    {
        $this->middleware('check.login');
        $this->orderAuditLogService = $orderAuditLogService;
    }

    public function my(Request $request)
    {

        $param['add_uid'] = $request->user('api')->user_id ?? null;

        $result = $this->orderAuditLogService->getMyLog($param);

        return $this->response->success($result);
    }

    public function submit(Request $request)
    {
       
        $param = $this->validationParameter([
            'id|类型' => 'require',
        ]);
        $param['add_uid'] = $request->user('api')->user_id ?? null;

        $result = $this->orderAuditLogService->submit($param);

        return $this->response->success($result);

    }

}
